import java.util.Scanner;

public class _01_SymmetricNumbers {

	public static void main(String[] args) {

		Scanner inputConsoleStream = new Scanner(System.in);

		int startRange = inputConsoleStream.nextInt();
		int endRange = inputConsoleStream.nextInt();

		inputConsoleStream.close();

		for (int i = startRange; i < endRange; i++) {

			char[] numForCheck = ("" + i).toCharArray();

			if (numForCheck.length == 1) {

				System.out.println(i);
			}
			else if (numForCheck.length == 2) {

				if (numForCheck[0] == numForCheck[1]) {

					System.out.println(i);
				}
			}
			else if (numForCheck.length == 3) {

				if (numForCheck[0] == numForCheck[2]) {

					System.out.println(i);
				}
			}
		}
	}
}